<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<TITLE>
DRA Systems: OR-Objects 1.2.4: Class  Problem
</TITLE>
<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../stylesheet.css" TITLE="Style">
</HEAD>
<BODY BGCOLOR="white">

<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_top"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT ID="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT ID="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../drasys/or/mp/Constraint.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../drasys/or/mp/Variable.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="Problem.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;<A HREF="#fields_inherited_from_class_drasys.or.matrix.RealContainer">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
drasys.or.mp</FONT>
<BR>
Class  Problem</H2>
<PRE>
java.lang.Object
  |
  +--<A HREF="../../../drasys/or/matrix/RealContainer.html">drasys.or.matrix.RealContainer</A>
        |
        +--<B>drasys.or.mp.Problem</B>
</PRE>
<HR>
<DL>
<DT>public class <B>Problem</B><DT>extends <A HREF="../../../drasys/or/matrix/RealContainer.html">RealContainer</A><DT>implements <A HREF="../../../drasys/or/mp/SizableProblemI.html">SizableProblemI</A>, java.io.Serializable</DL>

<P>
Container that holds a mathematical programming problem and metadata.
The this container can efficiently store both sparse and dense problems because it
can use any matrix type to hold the constraint coefficients.
The default matrix type is a
<A HREF="../../../drasys/or/matrix/CompressedColumnMatrix.html"><CODE>CompressedColumnMatrix</CODE></A>, which is efficient for storing sparse
problems and compatible with most sparse algorithms.
A coefficient can be accessed by its row/column name and by its row/column index.
All indices in the problem are zero based.
<P>
<DL>
<DT><B>See Also: </B><DD><CODE>MPSReader</CODE>, 
<CODE><P><FONT COLOR="#CC0000"><FONT SIZE=+1>References:</FONT></FONT><FONT SIZE=+1></FONT><P><B><A NAME="0716715872"HREF="http://www.amazon.com/exec/obidos/ISBN=0716715872/opsresearchcomA/" TARGET="amazon.com">Linear Programming</A></B><BR>&nbsp;&nbsp;&nbsp;&nbsp;Vasek Chvatal / Paperback / Published 1983<BR><B><A NAME="047182819X"HREF="http://www.amazon.com/exec/obidos/ISBN=047182819X/opsresearchcomA/" TARGET="amazon.com">Integer and Combinatorial Optimization</A></B><BR>&nbsp;&nbsp;&nbsp;&nbsp;George L. Nemhauser, Laurence A. Wolsey / Paperback / Published 1988<BR><B><A NAME="0471283665"HREF="http://www.amazon.com/exec/obidos/ISBN=0471283665/opsresearchcomA/" TARGET="amazon.com">Integer Programming</A></B><BR>&nbsp;&nbsp;&nbsp;&nbsp;Laurence A. Wolsey / Hardcover / Published 1998<BR></CODE>, <A HREF="../../../serialized-form.html#drasys.or.mp.Problem">Serialized Form</A></DL>
<HR>

<P>
<!-- ======== INNER CLASS SUMMARY ======== -->


<!-- =========== FIELD SUMMARY =========== -->

<A NAME="fields_inherited_from_class_drasys.or.matrix.RealContainer"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Fields inherited from class drasys.or.matrix.<A HREF="../../../drasys/or/matrix/RealContainer.html">RealContainer</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../drasys/or/matrix/RealContainer.html#_epsilon">_epsilon</A>,  
<A HREF="../../../drasys/or/matrix/RealContainer.html#_globalEpsilon">_globalEpsilon</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../drasys/or/mp/Problem.html#Problem(int, int)">Problem</A></B>(int&nbsp;capacityOfConstraints,
        int&nbsp;capacityOfVariables)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Construct an empty sparse problem with initial capacities.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../drasys/or/mp/Problem.html#Problem(int, int, drasys.or.matrix.SizableMatrixI)">Problem</A></B>(int&nbsp;capacityOfConstraints,
        int&nbsp;capacityOfVariables,
        <A HREF="../../../drasys/or/matrix/SizableMatrixI.html">SizableMatrixI</A>&nbsp;matrix)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Construct an empty problem with initial capacities using the supplied matrix for the coefficients.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.util.Enumeration</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../drasys/or/mp/Problem.html#coefficients()">coefficients</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a mutable 'Enumeration' of the sparse in the problem.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.util.Enumeration</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../drasys/or/mp/Problem.html#constraints()">constraints</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an 'Enumeration' of the constraints.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../drasys/or/mp/Problem.html#equals(java.lang.Object)">equals</A></B>(java.lang.Object&nbsp;o)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../drasys/or/mp/Problem.html#getCoefficientAt(int, int)">getCoefficientAt</A></B>(int&nbsp;constraintIndex,
                 int&nbsp;variableIndex)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets a matrix coefficient by index.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;double</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../drasys/or/mp/Problem.html#getCoefficientAt(java.lang.String, java.lang.String)">getCoefficientAt</A></B>(java.lang.String&nbsp;constraintName,
                 java.lang.String&nbsp;variableName)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Gets a matrix coefficient by name.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../drasys/or/matrix/MatrixI.html">MatrixI</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../drasys/or/mp/Problem.html#getCoefficientMatrix()">getCoefficientMatrix</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the matrx holding the coefficients.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../drasys/or/mp/ConstraintI.html">ConstraintI</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../drasys/or/mp/Problem.html#getConstraint(int)">getConstraint</A></B>(int&nbsp;rowIndex)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a constraint by row index.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../drasys/or/mp/ConstraintI.html">ConstraintI</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../drasys/or/mp/Problem.html#getConstraint(java.lang.String)">getConstraint</A></B>(java.lang.String&nbsp;name)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a constraint by name.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../drasys/or/util/Metadata.html">Metadata</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../drasys/or/mp/Problem.html#getMetadata()">getMetadata</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the metadata container for the problem.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../drasys/or/mp/VariableI.html">VariableI</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../drasys/or/mp/Problem.html#getVariable(int)">getVariable</A></B>(int&nbsp;columnIndex)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a variable by column index.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../drasys/or/mp/VariableI.html">VariableI</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../drasys/or/mp/Problem.html#getVariable(java.lang.String)">getVariable</A></B>(java.lang.String&nbsp;name)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a variable by name.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../drasys/or/mp/Problem.html#maskNames(java.util.Enumeration)">maskNames</A></B>(java.util.Enumeration&nbsp;names)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Renames all the variables and constraints to strings taken from 'names'.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../drasys/or/mp/ConstraintI.html">ConstraintI</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../drasys/or/mp/Problem.html#newConstraint(java.lang.String)">newConstraint</A></B>(java.lang.String&nbsp;name)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new constraint with default values.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../drasys/or/mp/VariableI.html">VariableI</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../drasys/or/mp/Problem.html#newVariable(java.lang.String)">newVariable</A></B>(java.lang.String&nbsp;name)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Creates a new variable with default values.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../drasys/or/mp/Problem.html#relaxInteger()">relaxInteger</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Changes all INTEGER or BOOLEAN variables to REAL variables.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../drasys/or/mp/Problem.html#setCapacity(int, int)">setCapacity</A></B>(int&nbsp;capacityOfConstraints,
            int&nbsp;capacityOfVariables)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Increases the constraint capacity.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../drasys/or/mp/Problem.html#setCoefficientAt(int, int, double)">setCoefficientAt</A></B>(int&nbsp;constraintIndex,
                 int&nbsp;variableIndex,
                 double&nbsp;value)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets a matrix coefficient by index.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../drasys/or/mp/Problem.html#setCoefficientAt(java.lang.String, java.lang.String, double)">setCoefficientAt</A></B>(java.lang.String&nbsp;constraintName,
                 java.lang.String&nbsp;variableName,
                 double&nbsp;value)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets a matrix coefficient by name.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../drasys/or/mp/Problem.html#sizeOfCoefficients()">sizeOfCoefficients</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the number of non-null coefficients in the problem.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../drasys/or/mp/Problem.html#sizeOfConstraints()">sizeOfConstraints</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the number of constraints in the problem.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../drasys/or/mp/Problem.html#sizeOfVariables()">sizeOfVariables</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the number of variable in the problem.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../drasys/or/mp/Problem.html#toString()">toString</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a String representation of this Problem.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.lang.String</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../drasys/or/mp/Problem.html#toString(int, int, int, int)">toString</A></B>(int&nbsp;beginConstraint,
         int&nbsp;endConstraint,
         int&nbsp;beginVariable,
         int&nbsp;endVariable)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a String representation of this Problem.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;java.util.Enumeration</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../drasys/or/mp/Problem.html#variables()">variables</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an 'Enumeration' of the variables.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_drasys.or.matrix.RealContainer"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class drasys.or.matrix.<A HREF="../../../drasys/or/matrix/RealContainer.html">RealContainer</A></B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../drasys/or/matrix/RealContainer.html#equals(double, double)">equals</A>, 
<A HREF="../../../drasys/or/matrix/RealContainer.html#getEpsilon()">getEpsilon</A>, 
<A HREF="../../../drasys/or/matrix/RealContainer.html#getGlobalEpsilon()">getGlobalEpsilon</A>, 
<A HREF="../../../drasys/or/matrix/RealContainer.html#setEpsilon(double)">setEpsilon</A>, 
<A HREF="../../../drasys/or/matrix/RealContainer.html#setGlobalEpsilon(double)">setGlobalEpsilon</A></CODE></TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TD><B>Methods inherited from class java.lang.Object</B></TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE>clone, 
finalize, 
getClass, 
hashCode, 
notify, 
notifyAll, 
wait, 
wait, 
wait</CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ FIELD DETAIL =========== -->


<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="Problem(int, int)"><!-- --></A><H3>
Problem</H3>
<PRE>
public <B>Problem</B>(int&nbsp;capacityOfConstraints,
               int&nbsp;capacityOfVariables)</PRE>
<DL>
<DD>Construct an empty sparse problem with initial capacities.
The internal coefficient matrix is a <A HREF="../../../drasys/or/matrix/SparseMatrix.html"><CODE>SparseMatrix</CODE></A>.
The Problem will dynamically increase its capacity as required when coefficients are added.
However; the initial capacities should be set as close as possible to the actual size of the problem
to minimize memory reallocation and fragmentation.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>capacityOfRows</CODE> - The initial row capacity.<DD><CODE>capacityOfColumns</CODE> - The initial row capacity.</DL>
</DD>
</DL>
<HR>

<A NAME="Problem(int, int, drasys.or.matrix.SizableMatrixI)"><!-- --></A><H3>
Problem</H3>
<PRE>
public <B>Problem</B>(int&nbsp;capacityOfConstraints,
               int&nbsp;capacityOfVariables,
               <A HREF="../../../drasys/or/matrix/SizableMatrixI.html">SizableMatrixI</A>&nbsp;matrix)</PRE>
<DL>
<DD>Construct an empty problem with initial capacities using the supplied matrix for the coefficients.
The supplied matrix should have the capacity set to the expected size of the problem and the size set to 0x0;
The Problem will dynamically increase its capacity as required when coefficients are added.
However; the initial capacities should be set as close as possible to the actual size of the problem
to minimize memory reallocation and fragmentation.<DD><DL>
<DT><B>Parameters:</B><DD><CODE>capacityOfRows</CODE> - The initial row capacity.<DD><CODE>capacityOfColumns</CODE> - The initial row capacity.</DL>
</DD>
</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="getMetadata()"><!-- --></A><H3>
getMetadata</H3>
<PRE>
public <A HREF="../../../drasys/or/util/Metadata.html">Metadata</A> <B>getMetadata</B>()</PRE>
<DL>
<DD>Returns the metadata container for the problem.<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="sizeOfConstraints()"><!-- --></A><H3>
sizeOfConstraints</H3>
<PRE>
public int <B>sizeOfConstraints</B>()</PRE>
<DL>
<DD>Returns the number of constraints in the problem.<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="sizeOfVariables()"><!-- --></A><H3>
sizeOfVariables</H3>
<PRE>
public int <B>sizeOfVariables</B>()</PRE>
<DL>
<DD>Returns the number of variable in the problem.<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="sizeOfCoefficients()"><!-- --></A><H3>
sizeOfCoefficients</H3>
<PRE>
public int <B>sizeOfCoefficients</B>()</PRE>
<DL>
<DD>Returns the number of non-null coefficients in the problem.<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="setCapacity(int, int)"><!-- --></A><H3>
setCapacity</H3>
<PRE>
public void <B>setCapacity</B>(int&nbsp;capacityOfConstraints,
                        int&nbsp;capacityOfVariables)</PRE>
<DL>
<DD>Increases the constraint capacity.<DD><DL>
<DT><B>Specified by: </B><DD><A HREF="../../../drasys/or/mp/SizableProblemI.html#setCapacity(int, int)">setCapacity</A> in interface <A HREF="../../../drasys/or/mp/SizableProblemI.html">SizableProblemI</A></DL>
</DD>
</DL>
<HR>

<A NAME="newVariable(java.lang.String)"><!-- --></A><H3>
newVariable</H3>
<PRE>
public <A HREF="../../../drasys/or/mp/VariableI.html">VariableI</A> <B>newVariable</B>(java.lang.String&nbsp;name)
                      throws <A HREF="../../../drasys/or/mp/DuplicateException.html">DuplicateException</A></PRE>
<DL>
<DD>Creates a new variable with default values.
<BR>
Default values:<BR>
<BR>
<tt>    type                 - REAL</tt><BR>
<tt>    lowerBound           - 0.0</tt><BR>
<tt>    upperBound           - POSITIVE_INFINITY</tt><BR>
<tt>    ObjectiveCoefficient - 0.0</tt><BR>
<BR><DD><DL>
<DT><B>Specified by: </B><DD><A HREF="../../../drasys/or/mp/SizableProblemI.html#newVariable(java.lang.String)">newVariable</A> in interface <A HREF="../../../drasys/or/mp/SizableProblemI.html">SizableProblemI</A></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the new variable.</DL>
</DD>
</DL>
<HR>

<A NAME="newConstraint(java.lang.String)"><!-- --></A><H3>
newConstraint</H3>
<PRE>
public <A HREF="../../../drasys/or/mp/ConstraintI.html">ConstraintI</A> <B>newConstraint</B>(java.lang.String&nbsp;name)
                          throws <A HREF="../../../drasys/or/mp/DuplicateException.html">DuplicateException</A></PRE>
<DL>
<DD>Creates a new constraint with default values.
<BR>
Default values:<BR>
<BR>
<tt>    type          - LESS</tt><BR>
<tt>    lowerRange    - NEGATIVE_INFINITY</tt><BR>
<tt>    upperRange    - POSITIVE_INFINITY</tt><BR>
<tt>    rightHandSide - 0.0</tt><BR>
<BR><DD><DL>
<DT><B>Specified by: </B><DD><A HREF="../../../drasys/or/mp/SizableProblemI.html#newConstraint(java.lang.String)">newConstraint</A> in interface <A HREF="../../../drasys/or/mp/SizableProblemI.html">SizableProblemI</A></DL>
</DD>
<DD><DL>
<DT><B>Returns:</B><DD>the new constraint.</DL>
</DD>
</DL>
<HR>

<A NAME="getVariable(java.lang.String)"><!-- --></A><H3>
getVariable</H3>
<PRE>
public <A HREF="../../../drasys/or/mp/VariableI.html">VariableI</A> <B>getVariable</B>(java.lang.String&nbsp;name)</PRE>
<DL>
<DD>Returns a variable by name.<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="getVariable(int)"><!-- --></A><H3>
getVariable</H3>
<PRE>
public <A HREF="../../../drasys/or/mp/VariableI.html">VariableI</A> <B>getVariable</B>(int&nbsp;columnIndex)</PRE>
<DL>
<DD>Returns a variable by column index.<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="getConstraint(java.lang.String)"><!-- --></A><H3>
getConstraint</H3>
<PRE>
public <A HREF="../../../drasys/or/mp/ConstraintI.html">ConstraintI</A> <B>getConstraint</B>(java.lang.String&nbsp;name)</PRE>
<DL>
<DD>Returns a constraint by name.<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="getConstraint(int)"><!-- --></A><H3>
getConstraint</H3>
<PRE>
public <A HREF="../../../drasys/or/mp/ConstraintI.html">ConstraintI</A> <B>getConstraint</B>(int&nbsp;rowIndex)</PRE>
<DL>
<DD>Returns a constraint by row index.<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="setCoefficientAt(int, int, double)"><!-- --></A><H3>
setCoefficientAt</H3>
<PRE>
public void <B>setCoefficientAt</B>(int&nbsp;constraintIndex,
                             int&nbsp;variableIndex,
                             double&nbsp;value)</PRE>
<DL>
<DD>Sets a matrix coefficient by index.<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="setCoefficientAt(java.lang.String, java.lang.String, double)"><!-- --></A><H3>
setCoefficientAt</H3>
<PRE>
public void <B>setCoefficientAt</B>(java.lang.String&nbsp;constraintName,
                             java.lang.String&nbsp;variableName,
                             double&nbsp;value)
                      throws <A HREF="../../../drasys/or/mp/NotFoundException.html">NotFoundException</A></PRE>
<DL>
<DD>Sets a matrix coefficient by name.<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="getCoefficientAt(int, int)"><!-- --></A><H3>
getCoefficientAt</H3>
<PRE>
public double <B>getCoefficientAt</B>(int&nbsp;constraintIndex,
                               int&nbsp;variableIndex)</PRE>
<DL>
<DD>Gets a matrix coefficient by index.<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="getCoefficientAt(java.lang.String, java.lang.String)"><!-- --></A><H3>
getCoefficientAt</H3>
<PRE>
public double <B>getCoefficientAt</B>(java.lang.String&nbsp;constraintName,
                               java.lang.String&nbsp;variableName)
                        throws <A HREF="../../../drasys/or/mp/NotFoundException.html">NotFoundException</A></PRE>
<DL>
<DD>Gets a matrix coefficient by name.<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="toString()"><!-- --></A><H3>
toString</H3>
<PRE>
public java.lang.String <B>toString</B>()</PRE>
<DL>
<DD>Returns a String representation of this Problem.<DD><DL>
<DT><B>Overrides:</B><DD>toString in class java.lang.Object</DL>
</DD>
</DL>
<HR>

<A NAME="toString(int, int, int, int)"><!-- --></A><H3>
toString</H3>
<PRE>
public java.lang.String <B>toString</B>(int&nbsp;beginConstraint,
                                 int&nbsp;endConstraint,
                                 int&nbsp;beginVariable,
                                 int&nbsp;endVariable)</PRE>
<DL>
<DD>Returns a String representation of this Problem.<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="maskNames(java.util.Enumeration)"><!-- --></A><H3>
maskNames</H3>
<PRE>
public void <B>maskNames</B>(java.util.Enumeration&nbsp;names)</PRE>
<DL>
<DD>Renames all the variables and constraints to strings taken from 'names'.
All variables and constraints will be renamed even if the original name was null.
The names enumeration argument must return 'String' objects.
If 'names' is null then a 'KeyGenerator' will be used that assigns names
with eight upper case alphabetic characters.<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="relaxInteger()"><!-- --></A><H3>
relaxInteger</H3>
<PRE>
public int <B>relaxInteger</B>()</PRE>
<DL>
<DD>Changes all INTEGER or BOOLEAN variables to REAL variables.
When a BOOLEAN variable is changed, the lower bound is set to 0.0 and
the upper bound is set to 1.0.<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="getCoefficientMatrix()"><!-- --></A><H3>
getCoefficientMatrix</H3>
<PRE>
public <A HREF="../../../drasys/or/matrix/MatrixI.html">MatrixI</A> <B>getCoefficientMatrix</B>()</PRE>
<DL>
<DD>Returns the matrx holding the coefficients.<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="coefficients()"><!-- --></A><H3>
coefficients</H3>
<PRE>
public java.util.Enumeration <B>coefficients</B>()</PRE>
<DL>
<DD>Returns a mutable 'Enumeration' of the sparse in the problem.
The 'Enumeration' returns elements which implement <A HREF="../../../drasys/or/matrix/MatrixElementI.html"><CODE>MatrixElementI</CODE></A>. 
The contents of a returned element must be used before getting the next element
because the same object is modified and reused for each 'nextElement' call.<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="variables()"><!-- --></A><H3>
variables</H3>
<PRE>
public java.util.Enumeration <B>variables</B>()</PRE>
<DL>
<DD>Returns an 'Enumeration' of the variables.
The 'Enumeration' returns elements which implement <A HREF="../../../drasys/or/mp/VariableI.html"><CODE>VariableI</CODE></A>.<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="constraints()"><!-- --></A><H3>
constraints</H3>
<PRE>
public java.util.Enumeration <B>constraints</B>()</PRE>
<DL>
<DD>Returns an 'Enumeration' of the constraints.
The 'Enumeration' returns elements which implement <A HREF="../../../drasys/or/mp/ConstraintI.html"><CODE>ConstraintI</CODE></A>.<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="equals(java.lang.Object)"><!-- --></A><H3>
equals</H3>
<PRE>
public boolean <B>equals</B>(java.lang.Object&nbsp;o)</PRE>
<DL>
<DD><DL>
<DT><B>Overrides:</B><DD>equals in class java.lang.Object</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>

<!-- ========== START OF NAVBAR ========== -->
<A NAME="navbar_bottom"><!-- --></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../overview-summary.html"><FONT ID="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT ID="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT ID="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../deprecated-list.html"><FONT ID="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../index-all.html"><FONT ID="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../help-doc.html"><FONT ID="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../drasys/or/mp/Constraint.html"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../drasys/or/mp/Variable.html"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../index.html" TARGET="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="Problem.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;<A HREF="#fields_inherited_from_class_drasys.or.matrix.RealContainer">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->

<HR>
Copyright(C)1997-2000 by DRA Systems all rights reserved. <A HREF=http://OpsResearch.com TARGET=HOME>OpsResearch.com</A>
</BODY>
</HTML>
